<?php
include("../inc/conn.inc");
include("../cache/cache.php");
$hover=2;
$rs=@mysql_query("select id,hot_name,hot_id,hot_is_num,hot_num from hot_product where id='".$_GET['id']."'");
$row=@mysql_fetch_array($rs);
$hot_num=$row[hot_is_num]?$row[hot_num]:15;
$rs2=@mysql_query("select id,hot_name from hot_product where id='$row[hot_id]'");
$row2=@mysql_fetch_array($rs2);
$rs3=@mysql_query("select id,city_name,city_id from city where id='$_GET[did]'");
$row3=@mysql_fetch_array($rs3);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=$row3[city_name]?><?=$row[hot_name]?>，<?=$row3[city_name]?><?=$row[hot_name]?>价格，<?=$row3[city_name]?><?=$row[hot_name]?>产品列表，热点产品</title>
<meta name="description" content="三帝贸易网热点产品目录为您提供<?=$row3[city_name]?><?=$row[hot_name]?>，<?=$row3[city_name]?><?=$row[hot_name]?>价格，<?=$row3[city_name]?><?=$row[hot_name]?>生产厂家、<?=$row3[city_name]?><?=$row[hot_name]?>，最新<?=$row3[city_name]?><?=$row[hot_name]?>产品列表。" />
<meta name="keywords" content="<?=$row3[city_name]?><?=$row[hot_name]?>，<?=$row3[city_name]?><?=$row[hot_name]?>价格，<?=$row3[city_name]?><?=$row[hot_name]?>产品列表，热点<?=$row3[city_name]?><?=$row[hot_name]?>产品，热点产品" />
<link href="/css/body.css" rel="stylesheet" type="text/css" />
<link href="/css/link.css" rel="stylesheet" type="text/css" />
<link href="/css/head.css" rel="stylesheet" type="text/css" />
<link href="/hot-pro/css/prolist.css" rel="stylesheet" type="text/css" />
<link href="/css/foot.css" rel="stylesheet" type="text/css" />

<style type="text/css">
<!--
.aa {
	font-size: 16px;
	font-weight: bold;
	color: #0033CC;
}
-->
</style>
<!--[if IE 6]>
<style type="text/css">
.probox em {
	height: 64px;
	width: 70px;
    _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/hot-pro/images/pp.png');  /* IE6 */
	display: block;
	top: 5px;
	left: 100px;
	position: absolute;
}
</style>
<![endif]-->

<!--[if gte IE 7]>
<style type="text/css">
.probox em {
	height: 64px;
	width: 70px;
	background: url(/hot-pro/images/pp.png) no-repeat;
	background-repeat: repeat-y;
	background-position: 10px 66px;
	display: block;
	top: 5px;
	left: 92px;
	position: absolute;
}
</style>
<![endif]-->
<?php 
if(stripos($_SERVER["HTTP_USER_AGENT"],"firefox")){
?>
<style type="text/css">
.probox em {
	height: 64px;
	width: 70px;
	background: url(/hot-pro/images/pp.png) no-repeat;
	background-repeat: repeat-y;
	background-position: 10px 66px;
	display: block;
	top: 5px;
	left: 90px;
	position: absolute;
}
</style>
<?php }?>
</head>
<body>
<?php include("../inc/head_top.php")?>
<?php include("../inc/index_search.php")?>
<?php include("../inc/menu.php");?>
<div id="mian" class="topside6 side">
<div class="title"><span><b><a href="http://www.sandib2b.cn/about/hotad.php" target="_blank">我想在这出现</a></b></span>您所在的位置：<a href="/">首页</a> >> <a href="/hot-pro/">热点产品</a> >> <a href="/hot/type-tid<?=$row2['id']?>.html"><?=$row2[hot_name]?></a> >> <a href="/hot/<?=$_GET[type_name]?>-cid<?=$_GET[id]?>.html"><?=$row[hot_name]?></a> >> <?=$row3[city_name]?><?=$row[hot_name]?></div>
<div class="onl"></div>
</div>
<div class="w960 topside20 downside20 side">
<script type="text/javascript">/*960*90，创建于2011-3-9*/ var cpro_id = 'u403357';</script><script src="http://cpro.baidu.com/cpro/ui/c.js" type="text/javascript"></script>
<div class="onl"></div>
</div>
<div id="mian" class="topside6">
<?php 
$a_rs=@mysql_query("select ad_url,ad_picture from adwords where type_id=1 and ad_id='".$_GET['id']."' and is_ok=1 order by id asc");
$a_rs2=@mysql_query("select count(id) from adwords where type_id=1 and ad_id='".$_GET['id']."' and is_ok=1");
$num=@mysql_result($a_rs2,0);
@mysql_free_result($a_rs2);
while($a_row=@mysql_fetch_array($a_rs)){?>
<?php if($a_row[ad_url]){?><a href="<?=$a_row[ad_url]?>" target="_blank"><?php }?><img src="/upfile/<?=$a_row[ad_picture]?>" width="235" height="100" border="0" /><?php if($a_row[ad_url]){?></a>
<?php }?>
<?php }
if(3-$num>0){
for($i=0;$i<3-$num;$i++){
?>
<img src="/hot-pro/ad/default.gif" width="235" height="100" border="0" />
<?php }}?> <a href="http://www.ds920.com" target="_blank"><img src="/hot-pro/ad/jiaoyou.gif" width="235" height="100" border="0" /></a>
</div>
<div id="mian" class="topside6 side" align="center">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-2924453545159453";
/* 728x90, 创建于 11-3-18 */
google_ad_slot = "0531157620";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<div class="onl"></div>
</div>
<div id="mian" class="topside6 side">
<div class="title1"><b><?=$row3[city_name]?><?=$row[hot_name]?></b><br />

<font style="color:red;font-size:14px;">
&nbsp;&nbsp;&nbsp;&nbsp;您的"<?=$row[hot_name]?>"商品信息还没在这里展示吗？ <span style="color:#000000;font-size:12px">升级为钻石会员，您的商品信息就会在页面优先展示，排名靠前! </span>
<br />
<span style="color:#000000;font-size:12px">&nbsp;&nbsp;&nbsp;&nbsp;加入钻石会员：请<a href="http://sandib2b.cn/about/contact.php" target="_blank">联系我们</a></span></font><br />
<br />

<b>产品列表</b></div>
<ul class="probox">
<?php 
//"select id,picture,m_type,p_title,catalog_id1,catalog_1,catalog_id2,catalog_2 from hot_pro_list  where  p_title like '%".$row[hot_name]."%' group by member_id order by m_type desc limit ".$hot_num

	$cache_name = "cache_hot_".$_GET['id'];
	$cache_time = 3600*24*7;
	$data = S($cache_name,'',null,'',array('temp'=>'../cachefile/hot/'));
	if(!$data)
	{
		$h_rs=@mysql_query("select id,member_id,picture,m_type,p_title,catalog_id1,catalog_1,catalog_id2,catalog_2 from hot_pro_list  where olddata=1 and  p_title like '%".$row[hot_name]."%' group by member_id order by m_type  desc limit ".$hot_num);
		while($h_row=@mysql_fetch_array($h_rs)){
			$olddata[]=$h_row;
		}

		$n_rs=mysql_query("select id,member_id,picture,m_type,p_title,catalog_id1,catalog_1,catalog_id2,catalog_2 from hot_pro_list  where olddata=0 and catalog_id3=".$_GET["id"]." group by member_id order by id  desc limit ".$hot_num);
		while($n_row=mysql_fetch_array($n_rs)){
		$newdata[]=$n_row;
		}
		if($newdata && $olddata)
		{
			$data=array_merge($newdata,$olddata);
		}
		else if($newdata)
		{
			$data=$newdata;
		}
		else if($olddata)	
		{
			$data=$olddata;
		}
		else
		{
			$data = array();
		}

		S($cache_name,$data,$cache_time,'',array('temp'=>'../cachefile/hot/'));
	}


	if($row['hot_id']==0)
	{
		$where = " catalog_id2 = $_GET[id]";
	}
	else
	{
		$where = " catalog_id3 = $_GET[id]";
	}
//	$where .= " and p_sh =1";
	$data2_sql = "select id,member_id,picture,m_type,p_title,catalog_id1,catalog_1,catalog_id2,catalog_3,catalog_id3 from hot_pro where".$where;
	
	$data2_rs = mysql_query($data2_sql);

	$data2 = array();
	while($data2_row=mysql_fetch_array($data2_rs))
	{
		$data2[] = $data2_row;
	}

	$data2 = array_merge($data2,$data);

	$pagesize=15;
	$count = count($data2);
	$pager = '';
	$url = "/hot2/".$_GET[type_name]."-cid$_GET[id]-p";

	if($count>$pagesize)
	{
		$pager .= '<div class="pager">';

		$p = intval($_GET['p'])?intval($_GET['p']):1;
		$limit = $p*$pagesize;
		$data2 = array_slice($data2,$limit-15,$limit);
		$pages = intval($count/$pagesize)+1;
		for($i=1;$i<$pages+1;$i++)
		{
			if($i == $p)
			{
				$pager .= '<span class="current">'.$i.'</span>';
			}
			else
			{
				$now_url = $url.$i.".html";
				$pager .= '<a href="'.$now_url.'">'.$i.'</a>';
			}
		}

		$pager .="</div>";
	}


foreach($data2 as $k=>$val)
{


?>

<li>
<?php if($val[m_type]==6){?>
<em></em> <?php } ?>
<table width="145" height="145" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#EBF0F5">
  <tr>
    <td align="center" valign="middle" style="padding: 6px;"><a href="/supply/<?=$val[id]?>.html" target="_blank"><?php if(trim($val[picture])){?><img src="http://img.sandib2b.cn/<?=$val[picture]?>" alt="<?=$val[p_title]?>"  border="0" width="145" height="145"/><?php }else{?><img src="/upfile/NoPICB.gif" border="0" width="145" height="145"/><?php }?></a></td>
  </tr>
</table>

<div class="a">
<?php if($val[m_type]==6){?>
    <div style="float: left;height: 40px;width: 25px;">
         <img src="/hot-pro/images/tj.gif" border="0" align="absmiddle" />
	</div>
<?php }?>
    <div style="float: left;text-align: left;width: <?php if($val[m_type]==6){echo "140px";}else{echo "160px";}?>;"><a href="/supply/<?=$val[id]?>.html" target="_blank"><?=mb_substr($val[p_title],0,18,'utf-8')?></a></div>
</div>
<div align="center"> 
<a href="/supply/<?=$val[id]?>.html" target="_blank"><img src="/hot-pro/images/hot_icon_01.gif" width="59" height="24" style="border:none" /></a>&nbsp;&nbsp;
<?php
	$m_rs=mysql_query("select m_user from member where id=".$val[member_id]);
	$m_row=mysql_fetch_array($m_rs);
    if($val[m_type]==6){ ?>
	<a href="http://<?=$m_row["m_user"] ?>.sandib2b.cn/contact.htm" target="_blank">
<?php }else { ?>
<a href="http://sandib2b.cn/cn/template/<?=$m_row["m_user"] ?>/contact.html" target="_blank">
<?php } ?>
<img src="/hot-pro/images/hot_icon_02.gif" width="59" height="24" style="border:none" />
</a>
</div>
</li>
<?php }

?>
</ul>
<br />
<div class="onl"></div><br />
<div style="clear:both"></div>
<?=$pager?>
</div>

<div class="w960 topside20 downside20">
<div style="padding-top:5px; padding-bottom:5px; background-color:#FFFFFF"><div id="adblock1"></div></div>
</div>
<div class="w960 topside20 downside20">
<script type="text/javascript">/*960*90底部，创建于2011-7-6*/ var cpro_id = 'u530503';</script><script src="http://cpro.baidu.com/cpro/ui/c.js" type="text/javascript"></script>
<div class="onl"></div>
</div>
<div id="mian" class="topside6" align="center">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-2924453545159453";
/* 728x90, 创建于 11-3-18 */
google_ad_slot = "0531157620";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<div class="onl"></div>
</div>

<div class="city topside6">
<div class="title1"><div style="float:right"><a href="/hot/<?=$_GET[type_name]?>-city<?=$_GET[id]?>.html" target="_blank">&gt;&gt;更多城市</a></div>城市导航</div>
<ul>
<?php
 $crs=@mysql_query("select id,city_name from city where city_id='$row3[city_id]' order by id asc");
 while($crow=@mysql_fetch_array($crs)){
?>
<li>
<h1><a href="/hot/<?=$_GET[type_name]?>-cid<?=$_GET[id]?>-did<?=$crow[id]?>.html" target="_blank"><font color="#0033CC"><?=$crow[city_name]?><?=$row[hot_name]?></font></a></h1>
</li>
<?php }?>
</ul>
<div class="onl"></div>
</div>

<div class="w960 topside20 downside20 side">
<script type="text/javascript">/*960*90底部，创建于2011-7-6*/ var cpro_id = 'u530503';</script><script src="http://cpro.baidu.com/cpro/ui/c.js" type="text/javascript"></script>
<div class="onl"></div>
</div>
<?php
include("../inc/foot.php");
?>
</body>
</html>

<script type="text/javascript">/*120*270，创建于2011-3-23*/ var cpro_id = 'u419785';</script><script src="http://cpro.baidu.com/cpro/ui/f.js" type="text/javascript"></script>


<script src="http://www.google.com/jsapi">
</script>
<script type="text/javascript" charset="utf-8">
google.load('ads.search', '2');
</script>
<script type="text/javascript" charset="utf-8">
var pageOptions = {
'pubId' : 'pub-2924453545159453',
'query' : '<?=$row[hot_name]?>'
}
var adblock1 = {
'container' : 'adblock1',
'number' : 3,
'width' : 'auto',
'lines' : 2,
'fontFamily' : 'arial',
'fontSizeTitle' : '14px',
'fontSizeDescription' : '14px',
'fontSizeDomainLink' : '14px'
};
new google.ads.search.Ads(pageOptions, adblock1);
</script>

